package arbori;

import Interpretor.Context;
import visitor.Visitor;

public class Nod {

	protected Nod fStang;
	protected Nod fDrept;
	protected double x;

	public Nod getFStang() {
		return fStang;
	}

	public void setFStang(Nod stang) {
		fStang = stang;
	}

	public Nod getFDrept() {
		return fDrept;
	}

	public void setFDrept(Nod drept) {
		fDrept = drept;
	}

	public double getX() {
		return x;
	}

	public void setX(double x) {
		this.x = x;
		if (fStang != null)
			fStang.setX(x);
		if (fDrept != null)
			fDrept.setX(x);
	}
	
/*
	public abstract double calcul();

	public abstract String derivare();

	public abstract double calculDerivata();

	public abstract String toString();
*/
	public void interpret(Context cont){}
	
	public void acceptVisitor(Visitor v) {
		v.visit(this);
	}
}
